/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ar.edu.utn.frsf.ofa.javaee7.tp.ejemplo.ecompras.converters;

import ar.edu.utn.frsf.ofa.javaee7.tp.ejemplo.ecompras.util.BaseProduccion;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.transaction.Transactional;

/**
 *
 * @author Administrador
 */
@ApplicationScoped
@Transactional
public class ConverterHelper {
    
    @Inject
    @BaseProduccion
    private EntityManager em;
    
    public Object findById(Class c,String value){
        return em.find(c, Integer.valueOf(value));
    }
}
